package com.hhb.juc.stream.function;

import com.hhb.juc.stream.Book;

import java.util.function.Consumer;
import java.util.function.Function;
import java.util.function.Predicate;
import java.util.function.Supplier;

public class Test {
    public static void main(String[] args) {
        Book book1 = new Book(1, "aaa", 34d);
        Book book7 = new Book(1, "aaa", 34d);
        Book book2 = new Book(2, "bbb", 34d);
        Book book3 = new Book(3, "ccc", 76d);
        Book book4 = new Book(4, "ddd", 99.89d);
        Book book5 = new Book(5, "eee", 45.7d);
        Book book6 = new Book(6, "fff", 123.5d);
        Function<String,String> function = (s)-> String.valueOf(s.length());
        System.out.println(function.apply("hello"));

        Predicate<String> predicate = s -> book1==book7;
        System.out.println(predicate.test("omg"));
        Consumer<String> consumer=null;
        Supplier<String> stringSupplier=null;
    }
}
